import {
  type TypedUseSelectorHook,
  useSelector,
  useDispatch,
} from "react-redux";
import type { AppDispatch, RootState } from "../store";

// 导出一个 useAppSelector 自定义hook
export const useAppSelector: TypedUseSelectorHook<RootState> = useSelector;
// 导出一个 useAppDispatch 自定义hook
export const useAppDispatch: () => AppDispatch = useDispatch;
